package de.ff7rl.core.effects;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;

import de.ff7rl.core.battle.BattleParticipant;

public class Effect {

  private EffectType type;

  private final List<Object> arguments = new ArrayList<Object>();

  public List<Object> getArguments() {
    return arguments;
  }

  public EffectType getType() {
    return type;
  }

  public void setType(final EffectType theType) {
    type = theType;
  }

  void process(final Set<BattleParticipant> theBattleParticipants) {
    for (final BattleParticipant battleParticipant : theBattleParticipants) {
      final EffectPerformer effectPerformer = type.getEffectPerformer();
      effectPerformer.perform(battleParticipant, arguments);
    }
  }

}
